/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #3498db;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    margin-top: 0;
    background-color: #2c3e50;
    border-radius: 5px;
    padding: 10px;
}

.nav-container-wrapper {
    display: flex;
    background-color: #2c3e50;
}

.nav-container {
    width: 220px;
    margin-right: 10px;
    background-color: #334353;
    border-radius: 5px;
    position: relative;
}

.nav-list {
    list-style: none;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #334353;
    border-radius: 0 0 5px 5px;
    z-index: 100;
}

.nav-container:hover .nav-list {
    display: block;
}

.nav-container:last-child {
    margin-right: 0;
}

.nav-title {
    color: white;
    padding: 15px;
    font-weight: bold;
    cursor: pointer;
    background-color: #334353;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
}

.nav-title::after {
    content: '►';
    font-size: 0.8em;
    transition: transform 0.3s;
}

.nav-container:hover .nav-title::after {
    transform: rotate(90deg);
}

.nav-list {
    list-style: none;
    display: none;
}

.nav-list.active {
    display: block;
}

.nav-list li {
    border-bottom: 1px solid #34495e;
}

.nav-list li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s;
}

.nav-list li a:hover {
    background-color: #34495e;
}

main {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #3498db;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type='text'],
input[type='number'],
input[type='date'],
select,
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-actions {
    margin-top: 20px;
}

/* 分页样式 */
.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination div {
    display: flex;
    gap: 5px;
}

.pagination span.btn {
    cursor: default;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}